<template>
  <div class="v-html">
    <component v-if="config.render" :is="config.render"></component>
    <div class="v-html-content" v-html="htmlStyle"></div>
  </div>
</template>

<script>
import CommonMixin from "../mixins/commonMixin";
export default {
  name: "v-html",
  mixins: [CommonMixin],
  computed: {
    htmlStyle() {
      return `<style>${this.config._css}</style>${this.config._html}`;
    },
  },
};
</script>

<style scoped>
.v-html,
.v-html-content {
  width: 100%;
  height: 100%;
  color:#fff;
}
</style>
